<template>
    <div>
       
        <!-- 轮播图 -->
        <mt-swipe :auto="4000">
            <mt-swipe-item v-for="(item,i) in lubotuList" :key="i">
               <img :src="item.img">
            </mt-swipe-item>
            
        </mt-swipe>
         <!-- //6宫格显示分类图标 -->
		        <ul class="mui-table-view mui-grid-view mui-grid-9">
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-home"></span>
		                    <div class="mui-media-body">新闻咨询</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-email"><span class="mui-badge">5</span></span>
		                    <div class="mui-media-body">图片分享</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-chatbubble"></span>
		                    <div class="mui-media-body">商品购买</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-location"></span>
		                    <div class="mui-media-body">留言反馈</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-search"></span>
		                    <div class="mui-media-body">视频专区</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <span class="mui-icon mui-icon-phone"></span>
		                    <div class="mui-media-body">联系我们</div></a></li>
		           
		        </ul> 
    </div>
</template>

<script>
export default {
  //一进来就发送请求获取轮播图
  data() {
    return {
      lubotuList: [] //保存轮播图数组
    };
  },
  created() {
    this.getLunbotu();
  },
  methods: {
    getLunbotu() {
      this.$http.get("http://127.0.0.1/index/api").then(resulet => {
        // console.log(resulet.body) --回来是假数据,完整的要返回一下status来进行判断
        this.lubotuList = resulet.body;
        //下面可以用个mint的Toast弹窗提示信息啥的
      });
    }
  }
};
</script>
<style lang="css" scoped>
.mint-swipe {
  height: 120px;
}
.mint-swipe-item img {
  width: 300px;
  height: 115px;
}
.mui-table-view mui-grid-view mui-grid-9{
    border: 0;
    background-color: #ffffff;
    
}
.mui-grid-view.mui-grid-9 .mui-table-view-cell{
    border: 0
}
.mui-media-body{
    font-size: 13px
}
</style>